package com.example.house_manager;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

public class HomeActivity extends Activity {

	private Button btn_logout;
	private ImageView imView_city;
	private ImageView imView_house;
	private ImageView imView_search;
	private ImageView imView_collect;
	// private ImageView imView_settings;
	private ImageView imView_more;

	public HomeActivity() {

	}

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_home);

		btn_logout = (Button) findViewById(R.id.logout_button);
		
		imView_city = (ImageView) findViewById(R.id.contact_imageView);
		imView_house = (ImageView) findViewById(R.id.mycollect_imageView);
		imView_search = (ImageView) findViewById(R.id.scanhistory_imageView);
		imView_collect = (ImageView) findViewById(R.id.account_imageView);
		imView_more = (ImageView) findViewById(R.id.more_imageView);
		
		
		btn_logout.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(HomeActivity.this, MainActivity.class);
				startActivity(intent);
			}
		});

		imView_city.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(HomeActivity.this, CityActivity.class);
				startActivity(intent);
			}
		});

		imView_house.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(HomeActivity.this, HouseActivity.class);
				startActivity(intent);
			}
		});

		imView_search.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(HomeActivity.this, SearchActivity.class);
				startActivity(intent);
			}
		});

		imView_collect.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(HomeActivity.this, MyCollectActivity.class);
				startActivity(intent);
			}
		});

		imView_more.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(HomeActivity.this, MyHouseActivity.class);
				startActivity(intent);
			}
		});

		
	}
}
